<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script> -->

    <!-- 路径可能跟我不一样，需要修改 -->
    <script src="../js/vue.global.js"></script>


</head>

<body>

    <div id="app">
        <div>{{counter}}</div>

        <!-- vue 绑定事件 -->
        <button v-on:click="fun()">点我计数器加1</button>
        <br>
        <button @:click="fun()">点我计数器加1</button>

    </div>


    <script>


        Vue.createApp({
            data() {
                return {
                    counter: 1,
                    info: '使用vue的事件绑定程序'
                }
            },
            methods: {
                fun() {
                    this.counter++
                }
            }
        }).mount("#app")



    </script>




</body>

</html>